import React, { useState } from 'react'
import Header from "@/components/Header";
import { Authority } from "@/components/hooks/authority";
import { Tabs } from 'antd';
import BusinessData from './business_data';
import BusinessReport from './business_report';
import style from "./index.module.less"

const UserManage = () => {
  // const isAuth = Authority("07");
  const [key, setKey] = useState(0)
  const items = [
    {
      key: 0,
      label: '下载全业务数据',
    },
    {
      key: 1,
      label: '业务报表',
    },
  ];
  
  const onChange = (e) => {
    setKey(e)
  }
  return (
    <div className='git_box'>
      <div className='top_bg_big'>
        <Header />
      </div>
      <div className={style.positipn_box}>
        <div className={style.tabs_big_box}>
          <Tabs defaultActiveKey="1" size='large' items={items} onChange={onChange} />
        </div>
        <div style={{ margin: "20px 10px 0px 10px" }}>
          {key === 0 ? (
            <BusinessData />
          ) : (
            <BusinessReport />
          )}
        </div>
      </div>
    </div>
  )
}

export default UserManage;
